home *** CD-ROM | disk | FTP | other *** search
/ Clinical Endocrinology / Clinical Endocrinology.iso / pc / 00000000 / history.dir / 00014_Script_14 < prev   
Text File  |  1995-11-09  |  1KB  |  37 lines

  1. -- handler to animate a button. Put the number of frames
  2. -- to use to animate (i.e. how many castmembers) into 
  3. -- "theCast". Put the length of delay between frames 
  4. -- required in clicks into "theClicks".
  5. -- Make sure the cast members are arranged sequentially
  6. -- in the cast window.
  7.  
  8. on animate theCast, theClicks
  9.   
  10.   -- put sound instruction here
  11.   put the clickOn into whichChannel
  12.   put the castNum of sprite whichChannel into whichCast
  13.   set i = whichCast + 1
  14.   
  15.   repeat while i < ( whichCast + theCast) 
  16.     
  17.     set the castNum of sprite whichChannel = i
  18.     updateStage
  19.     wait theClicks
  20.     set i = i + 1
  21.     
  22.   end repeat
  23.   
  24.   set the castNum of sprite whichChannel = whichCast
  25.   updateStage
  26.   
  27. end animate
  28.  
  29. ---------------------------------------------------
  30. -- handler to create a pause
  31.  
  32. on wait theClicks
  33.   put the timer into theTime
  34.   repeat while the timer < ( theTime + theClicks )
  35.   end repeat
  36. end wait
  37. --------------------------------------------------